#include <stdio.h>

int main()
{
	int a,last,end = 0;
	scanf("%d", &a);
	while (a){
		last = a%10;
		a /= 10;
		end = end*10 + last;
	}
	printf("%d", end);
	return 0;
}
